package com.qianniu.napi;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;

//移除 @SpringBootApplication and @ComponentScan, 用 @EnableAutoConfiguration 来替代
//@SpringBootApplication
//@Configuration
//@EnableAutoConfiguration
@EnableCaching
@SpringBootApplication
public class Application {

    /**
     * <p>
     * 测试 RUN
     * <br>
     * 1、http://localhost:8080
     * 2、http://localhost:8080/user/test1<br>
     * </p>
     */
    public static void main(String[] args) {
//		System.setProperty("org.mortbay.jetty.webapp.WebAppContext.maxFormContentSize",800000);
//		System.setProperty("org.mortbay.jetty.webapp.WebAppContext.maxFormContentSize",800000);
        SpringApplication.run(Application.class, args);
    }


    /**
     *jetty: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
     * @return
     */
//	@Bean
//	public EmbeddedServletContainerFactory servletContainer() {
//		JettyEmbeddedServletContainerFactory factory =
//				new JettyEmbeddedServletContainerFactory();
//
//		return factory;
//	}

//	@Bean
//	public FilterRegistrationBean testFilterRegistration() {
//		FilterRegistrationBean registration = new FilterRegistrationBean(new TestFilter());
//		registration.addUrlPatterns("/webapi/*"); //
//		registration.addInitParameter("paramName", "paramValue"); //
//		registration.setName("testFilter");
//		return registration;
//	}

}
